//
//  XWLoginOrRegisterController.m
//  CGWSWW
//
//  Created by lanou3g on 16/8/14.
//  Copyright © 2016年 CXG. All rights reserved.
//

#import "XWLoginOrRegisterController.h"

#import "HeadHelp.h"
@interface XWLoginOrRegisterController ()<UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *leftMargin;



@end

@implementation XWLoginOrRegisterController
- (IBAction)back:(id)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (IBAction)showloginOrResign:(UIButton *)button {
    [self.view endEditing:YES];
    if (self.leftMargin.constant) {
        self.leftMargin.constant = 0;
        button.selected = NO;
    }else{
        self.leftMargin.constant =-self.view.XW_width;
        button.selected =YES;
    }
    [UIView animateWithDuration:0.2 animations:^{
        [self.view layoutIfNeeded];
    }];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor =XWCommonColor;
    // Do any additional setup after loading the view from its nib.
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.view endEditing:YES];
}
@end
